package com.taijia.chapter8;

import java.io.*;

/**
 * Created by taijia on 2015/1/31.
 */
public class TestPrintStream2 {
    public static void main(String[] args) {
        PrintStream ps = System.out;
        String s;
        BufferedReader br = null;
        try {
            br = new BufferedReader(new FileReader("E:/myeclipse2014/Workspaces/2014/msb_basic/src/com/taijia/chapter8/TestBufferStream2.txt"));
            while ((s=br.readLine()) != null ) {
                ps.println(s);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if(null != br)
                    br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
